﻿using AgileBoard.Domain;

namespace AgileBoard.Dtos.Mappers
{
    public class FeelingsDTOMapper : BaseDTOMapper
    {
        public static FeelingsDTO MapToDTO(Feelings model)
        {
            var dto = new FeelingsDTO();
            dto.FeelingsID = model.UserMoodID;
            dto.UserID = model.UserID;
            dto.Feeling = model.Feeling;
            dto.Comment = model.Comment;
            dto.Date = model.Date;
            dto.CreateTime = model.CreateTime;
            dto.Creator = model.Creator;
            return dto;
        }

        public static Feelings MapFromDTO(FeelingsDTO dto)
        {
            var Feelings = new Feelings();
            Feelings.UserMoodID = dto.FeelingsID;
            Feelings.UserID = dto.UserID;
            Feelings.Feeling = dto.Feeling;
            Feelings.Comment = dto.Comment;
            Feelings.Date = dto.Date.ToLocalTime();
            Feelings.CreateTime = dto.CreateTime;
            Feelings.Creator = dto.Creator;
            return Feelings;
        }
    }
}